package com.example.music_liwei.adapter;



import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import com.example.music_liwei.fragment.BlankFragmentDesc;
import com.example.music_liwei.fragment.BlankFragmentGilde;

public class FragmentViewPagerAdapter extends FragmentStatePagerAdapter {

    private Fragment fragment;

    public FragmentViewPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int i) {
        switch (i){
            case 0:
                fragment = new BlankFragmentGilde();
                break;
            case 1:
                fragment = new BlankFragmentDesc();
                break;

        }
        return fragment;
    }

    @Override
    public int getCount() {
        return 2;
    }

}


